﻿
using CarAppDomain.CarParts.Entities;
using CarAppDomain.CarType.Entities;
using CarAppDto.CarType.CarTypeVersionDtos;
using D.UtilSqlsugarOrm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarAppDomain.CarType.IRepository
{
    public interface ICarTypeVersionEntityRepository : IBaseRepository<CarTypeVersionEntity>
    {
        /// <summary>
        /// 单个新增
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<int> AddCarTypeVersionAsync(CarTypeVersionEntity t, List<CarPartsCarTypeVersionEntity> carPartsList);

        /// <summary>
        /// 单个更新
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<int> UpdatCarTypeVersionAsync(CarTypeVersionEntity t, List<CarPartsCarTypeVersionEntity> carPartsList);

        /// <summary>
        /// 删除
        /// </summary>
        /// <returns></returns>
        Task<int> DeleteCarTypeVersionAsync(List<string> ids);

        Task<List<RepCarTypeVersion>> GetListAsync(System.Linq.Expressions.Expression<Func<CarTypeVersionEntity, bool>> where = null, System.Linq.Expressions.Expression<Func<CarTypeVersionEntity, object>> order = null);

        Task<PageModel<RepCarTypeVersion>> GetOrderPagesAsync(int pageSize, int current, System.Linq.Expressions.Expression<Func<CarTypeVersionEntity, bool>> where, System.Linq.Expressions.Expression<Func<CarTypeVersionEntity, object>> order = null, bool OrderByAsc = true);


    }
}
